<include file="Public:header" />
<!--主体内容-->
<!--左边-->
<div class="centent_box">
    <include file="Public:left" />
    <!--右边-->
    <div class="centent_right_box">
        <div class="centent_right rightCon">
            <div class="Mtitle">
                <ul>
                    <li class="on"><span>成交报告</span></li>
                </ul>
                <form id="info_form" action="{:U('Deal/retrieve')}" method="post" >
                    <ul>
                        <li style="margin-left: 100px">
                            <label>按</label>
                            <select id="search-type" name="s_type" style="line-height:25px;padding:5px 5px 5px 5px;border:1px solid #cccccc">
                                <option value="1">时间</option>
                                <option value="2">名称</option>
                            </select>
                        </li>
                        <li>
                            <input id="search-cond" onclick="laydate()" name="s_cond" style="line-height:24px;margin-left:20px;padding:2px 5px 3px 5px;border:1px solid #cccccc" type="text">
                            <span id="end">
                                --<input id="search-end" onclick="laydate()" name="s_end" style="line-height:24px;margin-left:20px;padding:2px 5px 3px 5px;border:1px solid #cccccc" type="text">
                            </span>
                        </li>
                        <li><button style="margin-left:20px;">搜索</button></li>
                    </ul>
                </form>

                <div class="rightWord"><a href="{:U('Used/index')}">成交管理</a> &gt;&gt; 成交报告</div>
            </div>
            <table class="tab_list">
                <tr>
                    <th style="width: 15%">房源名称</th>
                    <th style="width: 15%">交易类型</th>
                    <th style="width: 15%">成交价</th>
                    <th style="width: 10%">经纪人</th>
                    <th style="width: 10%">成交日期</th>
                    <th style="width: 15%">状态</th>
                    <th style="width: 20%">操作</th>
                </tr>
                <volist name="list['list']" id='vo'>
                    <tr>
                        <td>{$vo.title}</td>
                        <td><if condition="$vo.sell_type eq 1">出售<else/>出租</if>{$vo.estate}</td>
                        <td>{$vo.money}</a></td>
                        <td>{$vo.name}</td>
                        <td>{$vo.deal_time|substr=###,0,10}</td>
                        <td class="green">{$status[$vo['status']]}</td>
                        <td class="dn">
                            <a href="{:U('Deal/edit',array('id'=>$vo['deal_id']))}">编辑</a><span>|</span>
                            <a href="javascript:void(0);" data-name="{$vo.title}" onclick="del(this,{$vo['deal_id']})">删除</a><span>|</span>
                            <a href="{:U('Deal/details',array('id'=>$vo['deal_id']))}">详情</a>
                        <td>
                    </tr>
                </volist>
            </table>
            <div class="page">
                {$list.page}
            </div>


        </div>
    </div>
</div>
<script>
    function del(tar, id){
        var url = "{:U('Deal/del')}&id="+id;
        layer.msg('确定删除?', {
            time: 0 //不自动关闭
            ,btn: ['确定', '取消']
            ,yes: function(index){
                layer.close(index);
                window.location.href = url;
            }
        });
    }
    $('#search-type').change(function (){
        if ($(this).val() == 2){
            $('#search-cond').attr ('onclick', '');
            $('#end').hide();
        }else{
            $('#search-cond').attr ('onclick', 'laydate()');
            $('#end').show();
        }
    });
</script>
<include file="Public:footer" />